#ifndef CACHELISTAPI_H
#define CACHELISTAPI_H

#include <QObject>
#include <QMainWindow>
#include <QtNetwork>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <Utils.h>
#include <config.h>

class CacheListApi : public QObject
{
    Q_OBJECT
public:
    explicit CacheListApi(QObject *parent = nullptr);
    QByteArray* getNames();
    QByteArray* clearCacheAll();
    QByteArray* getKeys(const QString &cacheName);
    QByteArray* getValue(const QString &cacheName, const QString &cacheKeyName);
    QByteArray* clearCacheKey(const QString &cacheName, const QString &cacheKeyName);
    QByteArray* clearCacheName(const QString &cacheName);

    //缓存监控api
    QByteArray* cache();


signals: 

private:
    QString baseUrl ;
    QNetworkRequest request;
    QNetworkAccessManager *manager ;
    QByteArray *data = nullptr;
    Utils utils;
};

#endif // CACHELISTAPI_H
